package com.lwf.service;

import com.lwf.dao.mongodb.ArticleRepository;
import com.lwf.dao.mongodb.po.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ArticleService {
    @Autowired
    private ArticleRepository articleRepository;

    public void insertArticle(String title, String htmlStr, String url) {
        Article article = Article.builder().title(title).htmlStr(htmlStr)
                .url(url).build();
        articleRepository.insert(article);
    }

}
